/*
*	New C++ File starts here.
*	This file should be named obstacle_mapn_c_n.c
*/

/* Include all C language NML and CMS function prototypes. */
#include "nmlcms_c.h"

/* Include externally supplied prototypes. */
#include "obstacle_mapn_c_n.h"

/* Forward Function Prototypes */
#ifdef __cplusplus
extern "C" {
#endif

void cms_OBSTACLE_MAP_MSG_update(struct cms_c_struct *cms, nml_OBSTACLE_MAP_MSG_c_t *x);

#ifdef __cplusplus
}
#endif
long nml_obstacle_map_open(const char *buf, const char *proc, const char *cfg)
{
	return (long) nml_new(obstacle_map_c_format, buf,proc,cfg);
}

int  nml_obstacle_map_valid(long nml_id)
{
	return (int) nml_valid( (nml_c_t) nml_id);
}

void nml_obstacle_map_close(long nml_id)
{
	nml_free( (nml_c_t) nml_id);
}

int nml_obstacle_map_read(long nml_id)
{
	return (long) nml_read( (nml_c_t) nml_id);
}

int nml_obstacle_map_OBSTACLE_MAP_MSG_write(long nml_id, const nml_OBSTACLE_MAP_MSG_c_t *msg){
	return (int) nml_write( (nml_c_t) nml_id,(void *) msg, (nmltype_c_t) 114000,sizeof(nml_OBSTACLE_MAP_MSG_c_t));
}

nml_OBSTACLE_MAP_MSG_c_t * nml_obstacle_map_OBSTACLE_MAP_MSG_get_msg(long nml_id){
	return (nml_OBSTACLE_MAP_MSG_c_t *) nml_get_address( (nml_c_t) nml_id);
}




#ifndef MAX_OBSTACLE_MAP_C_NAME_LENGTH
#define MAX_OBSTACLE_MAP_C_NAME_LENGTH 17
#endif
#ifndef OBSTACLE_MAP_C_NAME_LIST_LENGTH
#define OBSTACLE_MAP_C_NAME_LIST_LENGTH 2
#endif


/* This list must be in alphabetical order and the three lists must correspond. */
const char obstacle_map_c_name_list[OBSTACLE_MAP_C_NAME_LIST_LENGTH][MAX_OBSTACLE_MAP_C_NAME_LENGTH]= {
	"OBSTACLE_MAP_MSG", /* 0,114000 */
	""};
const NMLTYPE obstacle_map_c_id_list[OBSTACLE_MAP_C_NAME_LIST_LENGTH]= {
	OBSTACLE_MAP_MSG_TYPE, /* 0,114000 */
	-1};
const size_t obstacle_map_c_size_list[OBSTACLE_MAP_C_NAME_LIST_LENGTH]= {
	sizeof(nml_OBSTACLE_MAP_MSG_c_t),
	0};
const char *obstacle_map_c_symbol_lookup(long type);


/* Enumerated Type Constants */

/*
*	NML/CMS Format function : obstacle_map_c_format
*	Automatically generated by NML CodeGen Java Applet.
*	on Sat Feb 25 10:10:17 EST 2006
*/
int obstacle_map_c_format(long type, void *buffer, struct cms_c_struct *cms)
{

	type = cms_check_type_info(cms,type,buffer,"obstacle_map_c",
		(cms_symbol_lookup_function_t) obstacle_map_c_symbol_lookup,
		(const char **)obstacle_map_c_name_list,
		obstacle_map_c_id_list,obstacle_map_c_size_list,
		OBSTACLE_MAP_C_NAME_LIST_LENGTH,
		MAX_OBSTACLE_MAP_C_NAME_LENGTH);

	switch(type)
	{
	case OBSTACLE_MAP_MSG_TYPE:
		cms_OBSTACLE_MAP_MSG_update(cms,(nml_OBSTACLE_MAP_MSG_c_t *) buffer);
		break;

	default:
		return(0);
	}
	return 1;
}


/* NML Symbol Lookup Function */
const char *obstacle_map_c_symbol_lookup(long type)
{
	switch(type)
	{
	case OBSTACLE_MAP_MSG_TYPE:
		return "OBSTACLE_MAP_MSG";
	default:
		return"UNKNOWN";
		break;
	}
	return(NULL);
}

/*
*	NML/CMS Update function for OBSTACLE_MAP_MSG
*	Automatically generated by NML CodeGen Java Applet.
*	on Sat Feb 25 10:10:17 EST 2006
*/
void cms_OBSTACLE_MAP_MSG_update(struct cms_c_struct *cms, nml_OBSTACLE_MAP_MSG_c_t *x)
{

	cms_begin_class(cms,"OBSTACLE_MAP_MSG","NMLmsg");

	cms_end_class(cms,"OBSTACLE_MAP_MSG","NMLmsg");

}

